<template>
	<div>
		<my-header :header="header"></my-header>
		<div class="form success">
			<div class="icon">
				<img src="../assets/img/sus@3x.png" />
			</div>
			<div class="tip">
				信息已提交成功
			</div>
			<div class="msg">
				感谢您的参与！
			</div>
			<div class="button return">
				<div v-on:click="back()">
					回到留名单
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import myHeader from '../components/my-header';
  import { mapState, mapActions } from 'vuex';
  import { USER_SIGNOUT } from '../store/user';
	export default {
		name: 'success',
		data() {
			return {
				header: {
					cnTitle: "",
					enTitle: "",
					cnStyle: {
						fontSize: "32px",
						marginTop: "15px"
					},
					enStyle: {
						fontSize: "18px"
					}
				}
			}
		},
    created: function() {
      // var _that = this;
      // if(_that.user.token==undefined){
      //   _that.$router.push('/login');
      // }
      },
		methods: {
      ...mapActions([USER_SIGNOUT]),
			back: function() {
				this.$router.push('/entering');
			}
		},
    computed: {
      ...mapState(['user'])
    },
		components: { myHeader }
	}
</script>
